package com.aftersale.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 *
 * @TableName role_permission
 */
@TableName(value ="role_permission")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RolePermission implements Serializable {
    /**
     *
     */
    @TableId
    @NotNull(message = "角色不能为空")
    @Range(min = 1,max = 20,message = "非法角色")
    private int roleId;

    /**
     *
     */

    @NotNull(message = "权限不能为空")
    @Range(min = 1,max = 20,message = "非法权限")
    private int permissionId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}